package com.shop.service.impl;

import java.util.List;

import com.shop.bean.Orders;
import com.shop.dao.IOrdersDao;
import com.shop.dao.impl.OrdersDaoImpl;
import com.shop.service.IOrdersService;

/** 
 * @className: OrdersServiceImpl.java
 * @classDescription: 
 * @function: 
 * @author: Wentasy
 * @createTime: 2012-11-1 下午07:19:33
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public class OrdersServiceImpl implements IOrdersService{
	
	private IOrdersDao orderDao = null;
	public int createOrder(Orders orders) throws Exception {
		orderDao = new OrdersDaoImpl();
		return this.orderDao.createOrder(orders);
	}

	public int deleteOrderById(long orderId) throws Exception {
		return this.orderDao.deleteOrderById(orderId);
	}

	public List<Orders> queryAllOrder() throws Exception {
		return this.orderDao.queryAllOrder();
	}

	public List<Orders> queryAllOrder(int startPage, int pageSize)
			throws Exception {
		return this.orderDao.queryAllOrder(startPage, pageSize);
	}

	public Orders queryOrderById(long orderId) throws Exception {
		return this.orderDao.queryOrderById(orderId);
	}

	public int updateOrder(Orders orders) throws Exception {
		return this.orderDao.updateOrder(orders);
	}

}
